/*
 * @Author         : yanyongyu
 * @Date           : 2022-09-16 12:36:00
 * @LastEditors    : yanyongyu
 * @LastEditTime   : 2022-10-04 09:02:06
 * @Description    : None
 * @GitHub         : https://github.com/yanyongyu
 */

.markdown-title code {
  padding: 2px 4px;
  font-size: 0.9em;
  line-height: 1;
  vertical-align: middle;
  background-color: var(--color-neutral-muted);
  border-radius: 6px;
}

g-emoji {
  display: inline-block;
  min-width: 1ch;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 1em;
  font-style: normal !important;
  font-weight: 400;
  line-height: 1;
  vertical-align: -0.075em;
}

.timeline-comment::before,
.timeline-comment::after {
  display: block;
  position: absolute;
  top: 11px;
  right: 100%;
  left: -8px;
  width: 8px;
  height: 16px;
  content: " ";
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  --webkit-clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.timeline-comment::before {
  background-color: var(--color-border-default);
}
.timeline-comment::after {
  margin-left: 2px;
  background-color: var(--color-canvas-default);
  background-image: linear-gradient(
    var(--color-canvas-subtle),
    var(--color-canvas-subtle)
  );
}
.timeline-comment.timeline-comment-nw::before {
  top: -12px;
  left: 12px;
}
.timeline-comment.timeline-comment-nw::before,
.timeline-comment.timeline-comment-nw::after {
  transform: rotate(90deg);
}

.comment-reaction-button {
  height: 26px;
  line-height: 26px;
  border-radius: 100px;
}
.comment-reaction-button > span {
  height: 24px;
  padding: 0 4px;
  margin-left: 2px;
}

.hx_IssueLabel {
  --perceived-lightness: calc(
    (
        (var(--label-r) * 0.2126) + (var(--label-g) * 0.7152) +
          (var(--label-b) * 0.0722)
      ) / 255
  );
  --lightness-switch: max(
    0,
    min(
      calc((var(--perceived-lightness) - var(--lightness-threshold)) * -1000),
      1
    )
  );
}
:root .hx_IssueLabel,
[data-color-mode="light"][data-light-theme*="light"] .hx_IssueLabel,
[data-color-mode="dark"][data-dark-theme*="light"] .hx_IssueLabel {
  --lightness-threshold: 0.453;
  --border-threshold: 0.96;
  --border-alpha: max(
    0,
    min(calc((var(--perceived-lightness) - var(--border-threshold)) * 100), 1)
  );
  color: hsl(0deg, 0%, calc(var(--lightness-switch) * 100%));
  background: rgb(var(--label-r), var(--label-g), var(--label-b));
  border-color: hsla(
    var(--label-h),
    calc(var(--label-s) * 1%),
    calc((var(--label-l) - 25) * 1%),
    var(--border-alpha)
  );
}
[data-color-mode="light"][data-light-theme*="dark"] .hx_IssueLabel,
[data-color-mode="dark"][data-dark-theme*="dark"] .hx_IssueLabel {
  --lightness-threshold: 0.6;
  --background-alpha: 0.18;
  --border-alpha: 0.3;
  --lighten-by: calc(
    ((var(--lightness-threshold) - var(--perceived-lightness)) * 100) *
      var(--lightness-switch)
  );
  color: hsl(
    var(--label-h),
    calc(var(--label-s) * 1%),
    calc((var(--label-l) + var(--lighten-by)) * 1%)
  );
  background: rgba(
    var(--label-r),
    var(--label-g),
    var(--label-b),
    var(--background-alpha)
  );
  border-color: hsla(
    var(--label-h),
    calc(var(--label-s) * 1%),
    calc((var(--label-l) + var(--lighten-by)) * 1%),
    var(--border-alpha)
  );
}

.tab-size {
  tab-size: 8;
}

.blob-num {
  position: relative;
  width: 1%;
  min-width: 50px;
  padding-right: 10px;
  padding-left: 10px;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
    Liberation Mono, monospace;
  font-size: 12px;
  line-height: 20px;
  color: var(--color-fg-subtle);
  text-align: right;
  white-space: nowrap;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}
.blob-num-addition {
  color: var(--color-fg-default);
  background-color: var(--color-success-subtle);
}
.blob-num-deletion {
  color: var(--color-fg-default);
  background-color: var(--color-danger-subtle);
}
.blob-code {
  position: relative;
  padding-right: 10px;
  padding-left: 10px;
  line-height: 20px;
  vertical-align: top;
}
.blob-code-inner {
  display: table-cell;
  overflow: visible;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas,
    Liberation Mono, monospace;
  font-size: 12px;
  color: var(--color-fg-default);
  word-wrap: anywhere;
  white-space: pre;
}
.blob-code-hunk {
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 22px;
  background-color: var(--color-accent-subtle);
  border-width: 1px 0;
}
.blob-code-addition {
  background-color: var(--color-success-subtle);
}
.blob-code-deletion {
  background-color: var(--color-danger-subtle);
}
